Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applications: serial_lte_modem: Fix asserts when pressing power pin #21081

Merged
merged 2 commits into from
Mar 25, 2025

Conversation

trantanen
Copy link
Contributor

@trantanen trantanen commented Mar 21, 2025

Asserts were enabled with PR #20040.
This has caused an assert to occur when pressing power pin, because GPIO callback (power_pin_callback_wakeup()) called slm_at_host_power_on(), which called k_sleep(), which has an assert that it's not called from interrupt context. Added most of the wake up operation into a worker.

Also added a command to modem_slm library for toggling power pin. In addition, adding main command for operations done in SLM shell device. Toggling power pin is done as follows:
"slmsh powerpin"

I have some follow-up PRs for SLM shell so I'll also update its documentation then regarding the new command. I'd like to get these changes in whenever they are technically OK so that test engineers can proceed testing the power pin.

Jira: LRCS-70
Jira: LRCS-84

@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Mar 21, 2025
@trantanen trantanen requested a review from a team March 21, 2025 07:56
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Mar 21, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 9

Inputs:

Sources:

sdk-nrf: PR head: e21f687de5212f75dd5d2d666f29340c848f085e

more details

sdk-nrf:

PR head: e21f687de5212f75dd5d2d666f29340c848f085e
merge base: 831d14c8a32905b89d6cadb9f01b94facb403865
target head (main): 831d14c8a32905b89d6cadb9f01b94facb403865
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (2)
applications
│  ├── serial_lte_modem
│  │  ├── src
│  │  │  │ main.c
lib
│  ├── modem_slm
│  │  │ modem_slm.c

Outputs:

Toolchain

Version: 4ffa2202d5
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:4ffa2202d5_8bf7ca4353

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 256
  • ✅ Integration tests
    • ✅ test-fw-nrfconnect-nrf-iot_serial_lte_modem
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_cloud
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@trantanen trantanen force-pushed the slm_powerpin_assert branch from c3bf395 to 47c081e Compare March 21, 2025 07:59
Copy link

You can find the documentation preview for this PR here.

@trantanen trantanen force-pushed the slm_powerpin_assert branch from 47c081e to 466eb13 Compare March 21, 2025 10:36
@trantanen trantanen force-pushed the slm_powerpin_assert branch from 466eb13 to e1fb005 Compare March 21, 2025 14:10
Copy link

@trantanen trantanen force-pushed the slm_powerpin_assert branch from e1fb005 to 616dd78 Compare March 24, 2025 12:12
@trantanen trantanen marked this pull request as ready for review March 24, 2025 12:19
@trantanen trantanen requested a review from a team as a code owner March 24, 2025 12:19
Asserts were enabled with PR nrfconnect#20040.
This has caused an assert to occur when pressing power pin,
because GPIO callback (power_pin_callback_wakeup)
called slm_at_host_power_on, which called k_sleep(),
which has an assert that it's not called from interrupt context.
Added most of the wake up operation into a worker.

Jira: LRCS-70

Signed-off-by: Tommi Rantanen <tommi.rantanen@nordicsemi.no>
Add command for toggling power pin.
Also adding main command for operations done in SLM shell device.
Toggling is done as follows:
"slmsh powerpin"

Jira: LRCS-84

Signed-off-by: Tommi Rantanen <tommi.rantanen@nordicsemi.no>
@trantanen trantanen force-pushed the slm_powerpin_assert branch from 616dd78 to e21f687 Compare March 25, 2025 08:57
@rlubos rlubos merged commit 3dbf4c5 into nrfconnect:main Mar 25, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants